home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GEMFBIND / VQMOUSE.S < prev    next >
Text File  |  1993-03-26  |  1KB  |  45 lines

  1. ;*========================================================================
  2. ;* VDIFAST Public Domain VDI bindings.
  3. ;*========================================================================
  4.  
  5.  
  6. ;*------------------------------------------------------------------------
  7. ;* Sample mouse button state.
  8. ;*------------------------------------------------------------------------
  9.  
  10.           globl     _vq_mouse
  11. _vq_mouse:
  12. ;    .cargs    #8,handle.w,status.l,x.l,y.l
  13.  
  14. handle      =         8
  15. status      =         10
  16. x          =         14
  17. y          =         18
  18.  
  19.           link        a6,#-4                ;* Allocate ptsout[2].
  20.  
  21. ;          VContrl    #124
  22.           move.w    handle(a6),-(sp)    ; contrl[6]
  23.           clr.l     -(sp)                ; contrl[5,4]
  24.           clr.l     -(sp)                ; contrl[3,2]
  25.           clr.w     -(sp)                ; contrl[1]
  26.           move.w    #124,-(sp)            ; contrl[0]
  27.  
  28.           pea        -4(a6)                ;* -> ptsout
  29.           move.l    status(a6),-(sp)    ;* -> intout
  30.           subq.l    #8,sp                ;* -> ptsin, intin
  31.           pea        16(sp)                ;* -> contrl
  32.  
  33.           move.l    sp,d1
  34.           jsr        vditrap
  35.  
  36.           move.l    x(a6),a0            ;* Return mouse x
  37.           move.w    -4(a6),(a0)         ;* from ptsout[0].
  38.           move.l    y(a6),a0            ;* Return mouse y
  39.           move.w    -2(a6),(a0)         ;* from ptsout[1].
  40.  
  41.           unlk        a6
  42.           rts
  43.  
  44.           end
  45.